package thoughtworks;

import junit.framework.Assert;
import junit.framework.TestCase;

public class MainTest extends TestCase {

	public void testGenerateSummary() {
		Main main = new Main();
		String string1 = main.generateSummary("2016-06-02 20:00~22:00 7\n2016-06-04 09:00~12:00 14");
		String string2 = main.generateSummary("2016-06-04 14:00~17:00 22\n2016-06-05 19:00~22:00 3\n" +
				"2016-06-06 12:00~15:00 15");
		String string3 = main.generateSummary("2016-06-07 15:00~17:00 12\n2016-06-08 10:00~13:00 19\n" +
				"2016-06-09 16:00~18:00 16\n2016-06-10 20:00~22:00 5");
		String string4 = main.generateSummary("2016-06-11 13:00~15:00 11");
		
		String result = main.generateSummary("2016-06-02 20:00~22:00 7\n2016-06-04 09:00~12:00 14\n" +
				"2016-06-04 14:00~17:00 22\n2016-06-05 19:00~22:00 3\n" +
				"2016-06-06 12:00~15:00 15\n2016-06-07 15:00~17:00 12\n" +
				"2016-06-08 10:00~13:00 19\n2016-06-09 16:00~18:00 16\n" +
				"2016-06-10 20:00~22:00 5\n2016-06-11 13:00~15:00 11");
		Assert.assertEquals(string1 + string2 + string3 + string4, result);
	}

}
